#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=1000000, maxm=300, mods=1000000007;

long long qpower(long long a, int n) {
  long long s=1;
  for (; n>1; n/=2) {
    if (n%2) {
      s = s*a%mods;
    }
    a = a*a%mods;
  }
  return s*a%mods;
}

long long fact[maxn+1], unfact[maxn+1];

void initFact(int n) {
  fact[0] = 1;
  for (int i=1; i<=n; i++) {
    fact[i] = fact[i-1]*i%mods;
  }
  unfact[n] = qpower(fact[n], mods-2);
  for (int i=n; i>0; i--) {
    unfact[i-1] = unfact[i]*i%mods;
  }
}

long long c(int n, int m) {
  return fact[n]*unfact[m]%mods*unfact[n-m]%mods;
}

int min(int a, int b) {
  return a<b ? a : b;
}

int main() {
  freopen("actor.in", "r", stdin);
  freopen("actor.out", "w", stdout);

  static long long f[2*maxm+1][maxm+1][maxm+1], sum[2*maxm+1][maxm+2][maxm+2];
  int n, m;
  scanf("%d %d", &n, &m);

  initFact(maxn);

  long long ans=0;
  f[0][0][0] = 1;
  sum[0][0][0] = 1;
  for (int i=1; i<=min(2*m, n); i++) {
    for (int j=1; j<=m; j++) {
      for (int k=m; k>0; k--) {
	f[i][j][k] = (f[i-1][j-1][k-1]+sum[i-1][j][k+1])%mods;
	sum[i][j][k] = (sum[i][j][k+1]+f[i][j][k])%mods;
	ans = (ans+f[i][j][k]*c(m, j)%mods*fact[j]%mods*c(n-1, i-1))%mods;
      }
    }
  }

  printf("%lld", ans%mods);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
